import java.util.Scanner;

/**
 * @author gao
 * @date 2025/9/25 10:35
 */

public class Solution {
    public String multiply(String num1, String num2) {
        if (num1.equals("0") || num2.equals("0")) {
            return "0";
        }

        int m = num1.length(), n = num2.length();
        int[] res = new int[m + n];

        // 从个位数开始逐位相加
        for (int i = m - 1; i >= 0; i--) {
            for (int j = n - 1; j >= 0; j--) {
                int mul = (num1.charAt(i) - '0') * (num2.charAt(j) - '0');
                int p1 = i + j; // 高位
                int p2 = i + j + 1; // 地位
                int sum = mul + res[p2];

                res[p2] = sum % 10; // 低位直接赋值
                res[p1] += sum / 10; // 高位加进位
            }
        }

        // 结果数组转为字符串
        StringBuffer buffer = new StringBuffer();
        for (int digit : res) {
            if (buffer.length() != 0 || digit !=0) {
                buffer.append(digit);
            }
        }

        return buffer.toString();
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            String num1 = in.nextLine();
            String num2 = in.nextLine();

            Solution solution = new Solution();
            System.out.println(solution.multiply(num1, num2));
        }
    }
}